
public class a {
	public static void main(String[] args) {
		String a="wo yi ding neng tong guo java kao shi";
		int b=0;
		int s=a.length();
		for(int i=0;i<s-1;i++){

				String str = a.substring(i,i+1);
				if(str.equals("a")){
					b++;
				}
			
		}
		System.out.println(b);
	}

}
